import { createRouter, createWebHistory, createWebHashHistory } from "vue-router";

const router = createRouter({
  routes: [
    // {
    //   path: "/login",
    //   //路由到的地址(自定义)
    //   name: "login",
    //   //组件名称
    //   component: () => import("../views/login.vue"),
    //   //引入组件，HomeComponent.vue所在路径
    //   //HomeComponent.vue是需要路由的vue组件
    // },
    {
      path: "/",
      redirect: "/announcement",
      component: () => import("../views/layout/Layout.vue"),
      children: [
        {
          path: "home",
          component: () => import("../views/layout/home.vue"),
        },
        {
          path: "dataCenter",
          component: () => import("../views/layout/dataCenter.vue"),
        },
        {
          path: "announcement",
          component: () => import("../views/layout/announcement.vue"),
        },
        {
          path: "operationsCenter",
          component: () => import("../views/layout/operationsCenter.vue"),
        },
      ],
    },

  ],
  history: createWebHashHistory(),
});
export default router;
